<?php

class LookupManager extends BaseManager implements iManager {
	
	public function query(){
		
	}
	
	public function add(){
		
	}
	
	public function update(){
		
	}
	
	public function delete(){
		
	}
	
	public function getBranchList() {
		$results = array();
		$query="SELECT 	`branch_id`, 
						`branch`, 
						`location`
						 
						FROM 
						`baliwagdb`.`branch_tbl`";
		
		$this->db->query($query);
		
		$this->db->execute();
		
		while ($result = $this->db->getResultAssoc()) {
			
			$branch = new Branch_Domain();
			$branch->setBranchId($result['branch_id']);
			$branch->setBranch($result['branch']);
			$branch->setLocation($result['location']);
		
			$results[] = $branch;
		}
		
		$this->result = $results;
	}
	
	public function getPositionList() {
		$results = array();
		$query="SELECT 	`possition_id`, 
						`possition_name`, 
						`possition_discription`, 
						`access_id`
						 
						FROM 
						`baliwagdb`.`possition_tbl`";
		
		$this->db->query($query);
		
		$this->db->execute();
		
		while ($result = $this->db->getResultAssoc()) {
			
			$position = new Position_Domain();
			$position->setPositionId($result['possition_id']);
			$position->setPositionName($result['possition_name']);
			$position->setDescription($result['possition_discription']);
			$position->setAccessId($result['access_id']);
			
			$results[] = $position;
		}
		
		$this->result = $results;
	
	}
	
	public function getStatusList() {
		$results = array();
		$query="SELECT 	`employment_status_id`, 
						`status`
						 
						FROM 
						`baliwagdb`.`employment_status_tbl`";
		
		$this->db->query($query);
		
		$this->db->execute();
		
		while ($result = $this->db->getResultAssoc()) {
			$status = new Status_Domain();
			$status->setEmployeeStatusId($result['employment_status_id']);
			$status->setStatus($result['status']);

			$results[] = $status;
		}
		
		$this->result = $results;
	
	}
	
}